Microcontrollers are often powered by batteries. Common alkali batteries may, for example, be used to power a microcontroller within a handheld infrared remote control device of the type typically used to control electronic consumer devices in the home. The supply voltage output by such common batteries decreases over a considerable voltage range as the batteries age. Consequently, commercially available microcontrollers that see use in such remote control devices may be specified to operate over relatively wide supply voltage ranges down to low supply voltages (for example, from 3.6 volts down to 2.0 volts). As the battery voltage drops from the voltage output by fresh batteries, the microcontroller is to continue to operate. As the battery voltage drops further and reaches the voltage at which the microcontroller is no longer specified to operate correctly, the microcontroller is to stop gracefully so that it does not function erratically.
In some cases, a microcontroller operating out of its specified supply voltage operating range can enter an illegal state and become “stuck” such that a processor portion of the microcontroller stops executing instructions. If the aged batteries are replaced with fresh batteries in a relatively quick fashion, then a charge may remain on power supply buses and lines within the microcontroller during the battery replacement operation. When fresh batteries are then installed, the processor of such a microcontroller may be seen to remain in its inoperative (stuck) state. This is undesirable.
If, on the other hand, the aged batteries are removed and the internal power supply buses and lines of the microcontroller are allowed to discharge down to ground potential before the fresh batteries are installed, then a power on reset (POR) circuit within the microcontroller will generally reset the processor. After the power on reset, the processor of the microcontroller will begin to execute instructions in proper fashion. Discharging the internal supply lines of the microcontroller in this fashion, however, is also not always desirable. In a remote control device application, it may be desired to keep a voltage on the power supply lines of the microcontroller throughout the battery replacement process. In a low-cost universal remote control device, the user of the remote control device may engage in a cumbersome process of loading codeset selection information into the remote control device. The codeset selection information may be stored in volatile static random access memory (SRAM) on the microcontroller integrated circuit. Such codeset selection information designates which one of multiple codesets should be used to generate RC operational signals that control the user's particular electronic consumer device. If there is enough capacitance on the internal power supply buses and lines to power the SRAM so that the SRAM continues to store the codeset selection information, then the batteries can be replaced without losing the SRAM contents. If the internal power supply lines of the microcontroller are allowed to discharge down to ground potential such that the power on reset circuit will reset the processor and prevent the processor from being stuck after the batteries are replaced, then the codeset selection information in the SRAM may be lost. This is also undesirable.
Although it is possible to provide an amount of non-volatile memory on the microcontroller integrated circuit to store the codeset selection information, providing such non-volatile memory is costly. For cost considerations, microcontrollers of low-cost universal remote control devices typically do not include non-volatile memory to store the codeset selection information.
Some microcontrollers used in remote control devices have a voltage detection circuit called a voltage brownout (VBO) detect circuit. The VBO detect circuit detects when the supply voltage on a power terminal of the microcontroller integrated circuit has dropped to a voltage (called the VBO voltage) at or close to the lower limit of the permissible microcontroller supply voltage operating range. When the VBO detect circuit detects this low voltage condition, the VBO detect circuit may, for example, cause the processor to be reset immediately before the battery voltage drops below the lower limit of the specified supply voltage operating range. The VBO state may, for example, be stored in a VBO bit in a status register such that when the processor recovers from the reset sequence the processor can read the VBO bit in the status register to determine the cause of the reset.
It is desirable that the VBO detect circuitry detect this voltage precisely, but in reality there is a spread from manufactured unit to manufactured unit due to manufacturing variability. VBO detect circuits of seemingly identical microcontroller units are observed to sense the VBO voltage at different voltages. Accordingly, in order to guarantee that no microcontroller unit will attempt to operate down to a supply voltage that is below the actual lower limit of the specified supply voltage operating range, the voltage at which the VBO detect circuit detects the VBO voltage is sometimes designed to be a voltage somewhat above the lower limit of the specified supply voltage range. The VBO detection spread may, for example, be plus or minus 0.15 volts. This spread may be specified by a microcontroller manufacturer as a “VBO minimum” value and a “VBO maximum” value. If the microcontroller is guaranteed to work down to a supply voltage of 1.8 volts, then the nominal VBO trip point may be set to 1.95 volts in order to guarantee that over the 0.15 volt VBO detect spread that the VBO detect circuit of an individual microcontroller unit will always have tripped before the supply voltage drops below the 1.8 volt lower limit of the specified supply voltage range. Unfortunately, if the nominal VBO trip point is set in this fashion, then the voltage at which the VBO detect circuit could trip in an individual microcontroller could be as high as 2.1 volts. If the VBO detect circuit were to trip at 2.1 volts, then the VBO detect circuit would have prevented the microcontroller from operating when the microcontroller could have operated properly and within specification all the way down to a supply voltage of 1.8 volts. Having to account for the VBO detection spread results in a waste of battery energy in many instances.
The manufacturing variability that gives rise to the VBO spread is somewhat unsystematic such that the voltage at which the VBO detect circuit will trip cannot generally be predicted from one unit to the next. A VBO detect circuit can be made to be programmable or trimmable so that the voltage at which an individual VBO detect circuit will trip can be adjusted. The trip voltages of the VBO circuits of the individual microcontrollers can be individually adjusted such that all the VBO detect circuits will all trip in a tighter voltage range. This technique is expensive, however, because each microcontroller is individually tested and adjusted. The technique is generally too expensive for low-cost universal remote control applications. A low-cost solution is desired for how to get more life out of the battery.